package cn.cainiao.servlet;

import cn.cainiao.dao.NameDao;
import cn.cainiao.entity.NameInfo;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;

@WebServlet(name = "ServletAllName")
public class ServletAllName extends HttpServlet {
    private static final long serialVersionUID = 1L;
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        ArrayList<NameInfo> plist = NameDao.selectAii();
        request.setAttribute("plist", plist);
        request.getRequestDispatcher("test/info.jsp").forward(request, response);

    }
}
